package com.apex.restful.domain;

import com.apex.entity.Tuser;
import com.edu.orm.annotation.TargetDataSource;
import com.edu.orm.repository.CustomRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * Create by IntelliJ IDEA
 * �û�������
 * ���ڣ�2018-4-4
 * ˢ���û�token��
 * ɾ���û�token
 */

public interface UserLoginDomain extends CustomRepository<Tuser,Long> {

    @Query("select t from Tuser t where t.userid =:userId or t.logincode=:loginCode")
    List<Tuser> findAllByUseridOrLogincode(@Param("userId") String userId,@Param("loginCode") String loginCode);

}
